


class Person1{
    static{
        System.out.println("我是个静态代码块");
    }
    public Person1() {
        System.out.println("我是构造方法");
    }

    {
        System.out.println("我是实例化代码块");
    }
    public void sleep() {
        System.out.println("睡觉");
    }
}
public class Test4 {

    public static void main(String[] args) {
     Person1 person1=new Person1();
     person1.sleep();
    }

}
